<!DOCTYPE html>
<html>
<!--Head-->
<head>
    <meta charset="utf-8" />
    <title>登录页</title>
    <meta name="description" content="login page" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <!--打开跟页面的宽-->
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--Basic Styles-->
    <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <link id="bootstrap-rtl-link" href="" rel="stylesheet" type="text/css"/>
    <link href="assets/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
    <!--Beyond styles-->
    <link id="beyond-link" href="assets/css/beyond.min.css" rel="stylesheet" type="text/css"/>
    <link href="assets/css/demo.min.css" rel="stylesheet" type="text/css"/>
    <link href="assets/css/animate.min.css" rel="stylesheet" type="text/css"/>
    <link id="skin-link" href="" rel="stylesheet" type="text/css" />
    <script src="assets/js/skins.min.js"></script>


<script>"undefined"==typeof CODE_LIVE&&(!function(e){var t={nonSecure:"49298",secure:"49307"},c={nonSecure:"http://",secure:"https://"},r={nonSecure:"127.0.0.1",secure:"gapdebug.local.genuitec.com"},n="https:"===window.location.protocol?"secure":"nonSecure";script=e.createElement("script"),script.type="text/javascript",script.async=!0,script.src=c[n]+r[n]+":"+t[n]+"/codelive-assets/bundle.js",e.getElementsByTagName("head")[0].appendChild(script)}(document),CODE_LIVE=!0);</script></head>
<!--Head Ends-->
<!--Body-->
<body data-genuitec-lp-enabled="false" data-genuitec-file-id="wc2-3" data-genuitec-path="/graduation/src/main/webapp/WEB-INF/OAsystem/login.html">
  <form id="form1" data-genuitec-lp-enabled="false" data-genuitec-file-id="wc2-3" data-genuitec-path="/graduation/src/main/webapp/WEB-INF/OAsystem/login.html">
    <div class="login-container animated fadeInDown" >
        <div class="loginbox bg-snow" style=" height:320px; margin: 50px 0px 0px 0px;">
            <div style="padding-top:25px" class="loginbox-title">企业办公内部管理平台</div>
            <div style="text-align:center;margin:30px 0px 5px 0px;font-size:18px;">
              登录
            </div>
            <div class="loginbox-textbox">
                <input type="text" required name="phoneOrEmail" id="phoneOrEmail" class="form-control" placeholder="姓名/手机号/邮箱" />
            </div>
            <div class="loginbox-textbox">
                <input type="password" required name="password" id="password" class="form-control" placeholder="密码"  />
            </div>
            <!--<div style="margin:4px auto" class="loginbox-social">
                <a href="./register">忘记密码？</a>
            </div><-->
            <div class="loginbox-submit">
                <input type="submit" class="btn btn-primary btn-block" value="登录">
            </div>
        	<hr style="height:3px; width: 300px;border:none;border-top:1px double gainsboro;margin: 0px auto;" />
             <div class="loginbox-submit">
             	<a href="./register">
        		<input class="btn btn-palegreen btn-block" value="注册">
        		</a>
            </div>
        </div>


    </div>
  </form>
    <!--Basic Scripts-->
    <script src="assets/js/jquery-2.0.3.min.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <script src="js/url.js"></script>

    <!--Beyond Scripts-->
    <!--<script src="assets/js/beyond.js"></script>-->
    <script>
      $("#form1").submit(function(e){
        e.preventDefault();
        var name = $("#phoneOrEmail").val();
        var pwd = $("#password").val();
        $.post(login_url,{
          phoneOrEmail:name,
          password:pwd
        },function(res){
          if(res.code==200){
            sessionStorage.userid = res.data.id;
            location.href = "/";
          }
          else {
            alert(res.msg);
          }
        });
      });
    </script>
</body>
<!--Body Ends-->
</html>
